<template>
  <div class="article">
    时间 标签 游览量 评价 点赞数

    <div v-html="compiledMarkdown">

    </div>
  </div>
</template>

<script>
import 'highlight.js/styles/default.css'
const marked = require('marked')
const hljs = require('highlight.js')
marked.setOptions({
  renderer: new marked.Renderer(),
  gfm: true,
  tables: true,
  breaks: false,
  pedantic: false,
  sanitize: false,
  smartLists: true,
  smartypants: false,
  highlight: function (code, lang) {
    if (lang && hljs.getLanguage(lang)) {
      return hljs.highlight(lang, code, true).value
    } else {
      return hljs.highlightAuto(code).value
    }
  }
})

export default {
  name: 'articleContent',

  computed: {
    compiledMarkdown () {
      const detail = ''
      return marked(detail)
    }
  }
}
</script>

<style lang="scss" scoped>

.article {

}
</style>
